package com.dlc.shop.bean.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author FrozenWatermelon
 * @date 2020/12/22
 */
@Data
public class UserScoreLockDTO {

    @NotNull(message = "orderNumber不能为空")
    @Schema(description = "orderNumber" ,requiredMode = Schema.RequiredMode.REQUIRED)
    private String orderNumber;

    @NotNull(message = "积分数量不能为空")
    @Min(value = 1,message = "积分数量不能为空")
    @Schema(description = "积分数量" ,requiredMode = Schema.RequiredMode.REQUIRED)
    private Long score;

    private Integer orderType;

    public UserScoreLockDTO(String orderNumber, Long score, Integer orderType) {
        this.orderNumber = orderNumber;
        this.score = score;
        this.orderType = orderType;
    }

}
